package com.aya.aspect;

import com.aya.mapper.model.ChildBean;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CustomBeanFactoryPostProcessor implements BeanFactoryPostProcessor {

    @Resource
    private ChildBean childBean;

    @Override
    public void postProcessBeanFactory(@Value("haha") ConfigurableListableBeanFactory beanFactory) throws BeansException {
        System.out.println("childBean-beanPostProcessor:"+childBean);
    }
}
